package v1

import (
	"github.com/gogf/gf/v2/frame/g"
	"github.com/gogf/gf/v2/os/gtime"
	"tFilm4/internal/model/entity"
)

type CreateMovieReq struct {
	g.Meta           `path:"/movie/create" method:"post" tags:"MovieService" summary:"添加一个新影片"`
	MovieName        string      `v:"required#请输入电影名称"`
	MovieDirector    string      `v:"required#请输入电影导演"`
	MovieActor       string      `v:"required#请输入电影导演"`
	MovieImage       string      `v:"required#请输入电影封面"`
	MovieDescription string      `v:"required#请输入电影简介"`
	MovieDuration    string      `v:"required#请输入电影时长"`
	MovieShowTime    *gtime.Time `v:"date#请确保上映时间字段为日期类型格式|required#请输入电影上映时间"`
}

type CreateMovieRes struct{}

type GetMovieListReq struct {
	g.Meta    `path:"/movie/list" method:"post" tags:"MovieService" summary:"获取电影列表"`
	PageSize  int `v:"required#请输入页大小|integer"`
	PageNum   int `v:"required#请输入页号|integer"`
	SearchKey string
}

type GetMovieListRes struct {
	Movies     []entity.Movie `json:"list" dc:"电影列表"`
	MovieCount int            `json:"count" dc:"总条数"`
}

type UpdateMovieReq struct {
	g.Meta `path:"/movie/update" method:"post" tags:"MovieService" summary:"修改电影信息"`
	Movie  *entity.Movie `v:"required#请输入要修改的电影信息" json:"movie"`
}

type UpdateMovieRes struct{}

type GetMovieByIdReq struct {
	g.Meta  `path:"/movie/id" method:"post" tags:"MovieService" summary:"根据ID编号查询电影"`
	MovieId int `v:"required#请输入电影编号"`
}

type GetMovieByIdRes struct {
	Movie *entity.Movie `json:"movie" dc:"电影"`
}

type GetShowingMovieListReq struct {
	g.Meta `path:"/movie/showing/list" method:"post" tags:"MovieService" summary:"获取正在热映的电影"`
}
type GetShowingMovieListRes struct {
	Movies     []entity.Movie `json:"list" dc:"电影列表"`
	MovieCount int            `json:"count" dc:"总条数"`
}

type GetComingMovieListReq struct {
	g.Meta `path:"/movie/coming/list" method:"post" tags:"MovieService" summary:"获取即将上映的电影"`
}
type GetComingMovieListRes struct {
	Movies     []entity.Movie `json:"list" dc:"电影列表"`
	MovieCount int            `json:"count" dc:"总条数"`
}
